package com.example.tests;

import java.util.Random;

import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;

import com.example.fw.ApplicationManager;

public class TestBase {

	public static ApplicationManager app;

	@BeforeTest
	public void setUp() throws Exception {
		app = new ApplicationManager();
	}

	@AfterTest
	public void tearDown() throws Exception {
		app.stop();
	}

	public String generateRandomString() {
		Random rnd = new Random();

		if (rnd.nextInt(3) == 0) {
			return "";
		} else {
			return " " + rnd.nextInt();
		}
	}
}